package com.corpgovernment.common.holder;

import com.corpgovernment.common.utils.Null;
import com.ctrip.corp.obt.generic.core.context.RequestContext;

/**
 * @author zl.cui
 * @date 2023/11/22
 */
public class TraceIdHolder {
    private static final String QUERY_TRACE_ID_PREFIX = "queryTraceId";
    public static String getTraceId(){
        return (String) RequestContext.getCurrentContext().getContextParams(QUERY_TRACE_ID_PREFIX);
    }

    public static void setTraceId(String traceId){
        RequestContext.getCurrentContext().addContextParams(QUERY_TRACE_ID_PREFIX, traceId);
    }
}
